package com.kalaqia.base.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;

/**
 * @author kalaqia 421407393@qq.com
 */
public class TestActivity<T extends Fragment> extends BaseActivity {

    private T fragment;

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_base;
    }

    public void setFragment(T fragment) {
        this.fragment = fragment;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.id_base_layout, fragment).commit();
        }
    }


}
